<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>掌握DTS二次开发基础需求，轻松驾驭SDK全局模块！</title>
    <link rel="stylesheet" href="./lib/styles.css" />
    <script type="text/javascript" src="./lib/aircity/ac.min.js"></script>
    <script type="text/javascript" src="./lib/aircity/ac_conf.js"></script>
  </head>
  <body>
    <div id="player"></div>

    <div class="nav">
      <div onclick="goHtml('./面板设置.html')">面板设置</div>
      <div onclick="goHtml('./场景漫游.html')">场景漫游</div>
      <div onclick="goHtml('./图层树.html')">图层树</div>
      <div onclick="goHtml('./环境.html')">环境</div>
    </div>

    <script type="text/javascript">
      /**
       * 初始化场景
       */
      const OnLoad = () => {
        const __DigitalTwinPlayer = new DigitalTwinPlayer(HostConfig.Player, {
          domId: 'player'
        })
      }

      const goHtml = url => {
        window.location.href = url
      }

      /**
       * 自适应分辨率
       */
      const onResize = async () => {
        let playerView = document.getElementById('player')
        playerView.style.height = window.innerHeight + 'px'
        playerView.style.width = window.innerWidth + 'px'
      }

      // 页面加载调用
      window.addEventListener('load', OnLoad, true)

      // 页面窗口变换调用
      window.addEventListener('resize', onResize, true)
    </script>
  </body>
</html>
